package com.hugedata.cdnserver.util;

import java.util.Calendar;
import java.util.Date;

import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang.time.DateUtils;

/**
 * @ClassName: DateAdvancedUtils
 * @Description: 日期时间工具类
 * @author Wangxiaoming
 * @date Jul 7, 2014 8:13:51 PM
 *
 */
public class DateAdvancedUtils extends DateUtils
{
    /**
     * 
    * @Title: getPrevHourTime
    * @Description: 获取当前时间前一个小时的时间戳（格式：/20140707/19）
    * @author Wangxiaoming
     */
    public static String getPrevHourTime()
    {
        Date currentDate = Calendar.getInstance().getTime();
        //获取当前时间前一小时的时间爱你
        Date lastDate = DateUtils.addHours(currentDate, -1);
        String timeStr = DateFormatUtils.format(lastDate, "/yyyyMMdd/HH");
        return timeStr;
    }
}
